﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

namespace B2B.Models
{
    public class SP_CapNhatDonHang
    {
        public static int capNhatDonHang(int maDH, int tinhTrang)
        {
            SqlConnection conn = KetNoi.Connection();
            SqlCommand cmd = new SqlCommand("SP_CAPNHATDONHANG", conn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MADONHANG", maDH);
            cmd.Parameters.AddWithValue("@TINHTRANG", tinhTrang);
            conn.Open();
            int kq = cmd.ExecuteNonQuery();
            conn.Close();
            return kq;
        }
    }
}